.table{
    color: $gray-text;
    width: 100% !important;
    font: 14px/16px Arial, sans-serif; 
    td.type-numeric{
        text-align: right;
    }
    td.editable{
        position: relative;
        &:after { 
            content: "";
            position: absolute;
            top: 0;
            right: 0;
            width: 0; 
            height: 0; 
            display: block;
            border-left: 8px solid transparent;
            border-bottom: 8px solid transparent;
            border-top: 8px solid #2a81cb;
            }
    }
    tr{
        .type-title{
            white-space: break-spaces;
            max-width: 300px;            
            position: relative;
            &:before{
                display: block;
                @include absolute(0, 0);
                content: "";
                height: 100%;
                width: 30px;
                @include gradient-horizontal(transparent, #fff, 0%, 70%);
            }
        }
        &.selected{
            background-color: #e1e3e3 !important;
            input.checkbox-filter{
                & ~ label .tick{
                    background-position: -43px 0;
                }
                & ~ label:hover .tick,
                & ~ label:focus .tick{
                    background-position: -43px -36px;
                }
                &:checked ~ label .tick {
                    background-position: -43px -72px;
                }
                &:checked ~ label:hover .tick,
                &:checked ~ label:focus .tick {
                    background-position: -43px -108px;
                }
                &:disabled ~ label .tick,
                &:checked:disabled ~ label .tick {
                    background-position: -43px -144px;
                }
                &:disabled ~ label:hover .tick,
                &:checked:disabled ~ label:hover .tick,
                &:disabled ~ label:focus .tick,
                &:checked:disabled ~ label:focus .tick {
                    background-position: -43px -180px;
                }
            }
        }
        @extend .add-transition;
        td{
            word-wrap: break-word;
            overflow-wrap: break-word;
        }
        th{
            &.with-search{
                padding-left: 40px;
                min-width: 150px;
            }
        }
        &.disabled{
            background: repeating-linear-gradient(-45deg, #dbdfe2, #dbdfe2 2px, transparent 2px, transparent 6px);
            a, label, input, button{
                cursor: not-allowed;
                pointer-events: none;
            }
            td{
                &:hover, &:focus, &:active{
                    a:hover, a:focus, a:active{
                        color: $gray_text !important;
                    }
                }
            }   
        }
    }
    thead{
        @extend %uppercase-font; 
        letter-spacing: 0.5px;
        color: $gray_light;
        tr th{
            &.vertical-align-middle {
                vertical-align: middle;
                &:after{
                    top: calc(50% - 8px);
                }
            }
            padding: 15px;
            font-weight: normal;  
            vertical-align: top;
        }
    }
    tbody{      
        tr{
            td{
                border-bottom: none;
                border-top: none;
                &.date{
                    font: 14px/16px $trebuchet;
                    white-space: nowrap;
                }
                &.parameters{
                    font-family: $trebuchet_bold;
                    color: $gray-highlight-font;
                    span{
                        @extend %gray-uppercase;
                        text-transform: none; 
                    }
                } 
                &.title-row{
                    font-size: 18px;
                    line-height: 20px;
                    a, span{
                        font-size: 18px;
                        line-height: 20px;
                    }
                }
                &.centered-italic{
                    text-align: center;
                    font-style: italic;
                }
                padding: 15px;
                vertical-align: middle;
                height: 35px;              
                .pull-right .glyphicon-remove, .caret{
                    color: #fff;
                }
                a{
                    @extend .add-transition;
                    text-overflow: ellipsis;
                    color: $gray_text;
                    
                }
                &:hover, &:focus, &:active{
                    a:hover, a:focus, a:active{
                        color: $blue !important;
                        text-decoration: none;
                    }
                }
            }
        }
    }
    tfoot{
        tr{
            border-top: 1px solid #ddd;
            border-bottom: 1px solid #ddd;
            td, th{
                border-top: none;
                padding: 15px;
                height: 35px;
                &.title-row{
                    font-size: 18px;
                    line-height: 20px;
                    a, span{
                        font-size: 18px;
                        line-height: 20px;
                    }
                }
                &.type-numeric{
                    text-align: right;
                }
                &:hover, &:focus, &:active{
                    a:hover, a:focus, a:active{
                        color: $blue !important;
                        text-decoration: none;
                    }
                }
                a{
                    @extend .add-transition;
                    text-overflow: ellipsis;
                    color: $gray_text;
                }
            }
        }
    }
    .total-row{
        border-top: 2px solid #ddd;
        border-bottom: 2px solid #ddd;
        td{
            font-weight: bold;
        }
    }
}
.table-striped {
    tbody tr{
        background-color: #f8f9f9;
        td.type-title{
            &:before{
                @include gradient-horizontal(transparent, #f8f9f9, 0%, 70%);
            }
        }
    }
    &> tbody > tr:nth-of-type(odd){
        background-color: #edeff0;
        &.selected{
            td.type-title{
                &:before{
                    @include gradient-horizontal(transparent, $table-selected, 0%, 70%);
                }
            }
        }
        td.type-title{
            &:before{
                @include gradient-horizontal(transparent, #edeff0, 0%, 70%);
            }
        }
    }
}
.table-striped-odd{
    tbody tr{
        background-color: #f8f9f9;
    }
    &> tbody > tr.odd{
        background-color: #edeff0;
    }
}
.table-bordered{
    border: none;
    & > thead, 
    & > tbody, 
    & > tfoot{
        & > tr{
            & > td, & > th{
                border-bottom: none;
                border-right-color: transparent;
                border-left: 1.5px solid #f8f9f9;
                &:first-child{
                    border-left: none;
                }
            }
        }
    }
}
.table-ordered{
    thead tr th{
        padding-right: 25px !important;
        position: relative;
        cursor: pointer;
        &.sorting_disabled{
            &.sorting_desc, &.sorting_asc{
                color: $gray_light;
            }
            &:after{
                display: none !important;
            }
        }
        &:focus, &:hover, &:active:focus{
            outline: none;
        }
        &:after{
            display: inline-block;
            content: "";
            width: 0;
            height: 0;
            border-top: 10px solid $gray_form;
            border-right: 6px solid transparent;
            border-left: 6px solid transparent;
            @include absolute(17px, 10px);
        }
        &.sorting.sorting_asc{
            color: $blue;
            &:after{
                border-top: none;
                border-bottom: 10px solid $blue;
            }
        }
        &.sorting.sorting_desc{
            color: $blue;
            &:after{
                border-top-color: $blue;
                
            }
        }
    }
    thead th.padding-left-slide:first-child{
        padding-left: ($width-search-input +65px);
    }
}
.table{
    thead tr th{
        &.sorting{
            padding-right: 25px !important;
            position: relative;
            cursor: pointer;
            &:after{
                display: inline-block;
                content: "";
                @include absolute(17px, 10px);
                width: 0;
                height: 0;
                border-top: 10px solid $gray_form;
                border-right: 6px solid transparent;
                border-left: 6px solid transparent;
            }
            &.sorting-up{
                color: $blue;
                &:after{
                    border-top-color: $blue;
                }
            }
            &.sorting-down{
                color: $blue;
                &:after{
                    border-top: none;
                    border-bottom: 10px solid $blue;
                }
            }
        }
    }
}
.table-hover{
    tbody{
        tr{
            &:hover, &:focus{
                background-color: $blue-super-light;
                a{
                    color: #000;
                }
                td.type-title{
                    &:before{
                        @include gradient-horizontal(transparent, $blue-super-light, 0%, 70%);
                    }
                }
            }
        }
    }
}
.table-with-checkboxes{
    thead tr, tbody tr{
        td, th{
            &.checkbox-cell{
                max-width: 40px;
                width: 40px;
                text-align: center;
                padding: 15px 3px 15px 10px;
                outline: none;
            }
        }
        th{
            &.checkbox-cell{
                padding-top: 12px;
                padding-right: 0 !important;
            }
        }
    }
    tbody{
        tr{
           td{
                label{
                    padding: 0;
                    margin: 0;
                    .tick{
                        position: relative;
                        margin: 0;
                    }
                }
            } 
        }  
    }
}
.table-with-scroll{
    overflow-x: auto;
    margin-bottom: 10px;
}
.dataTables_wrapper{
    position: relative;
    .dataTables_filter{
        @include absolute(-62px, 0);
        z-index: 2;
        label{
            font-size: 0;
            color: transparent;
            margin-bottom: 0;
            min-height: 30px; 
            input{
                height: 40px;
                @extend .add-transition;
                font-size: 13px;
                line-height: 15px;
                color: $gray_text;
                border-radius: 5px;
                outline: none;

                margin-right: 10px;
                border: 1px solid $gray_form;
                width: $width-search-input;
                padding: 5px 30px 5px 10px;
                &:hover, &:focus, &:active{
                    border-color: $gray-highlight-font;
                }
                &:not(:placeholder-shown) + .btn-clear{
                    opacity: 1;
                    visibility: visible;
                    right: 10px;
                }
            }
        }
    }
}
.dataTables_wrapper {
    .dataTables_info, .download-report{
        clear: both;
        float: right;
        padding-top: 0.755em;
        padding-bottom: 10px;
        font: 13px/15px $trebuchet_bold;
        padding-left: 20px;
        text-align: right;
    }
    .download-report{
        padding-top: 5px;
    }
}
.dataTables_paginate{
        position: relative;
        padding: 40px 0 10px 0;
        overflow: hidden;
        @extend %uppercase-font; 
        font-size: 14px;
        line-height: 16px;
        &>span{
            display: block;
            @include absolute(10px, null, null, 0);
        }
        .paginate_button{
            padding: 6px 12px;
            cursor: pointer;
            &.disabled, &.disabled:hover, &.disabled:active{
                color: $gray_light;
                text-decoration: none;
                cursor: not-allowed;
            }
            &.current, &.current:hover{
                color: $gray_light !important;
            }
        }
        &>.paginate_button{
            float: left;
            padding: 5px 12px;
        }
    }
.dataTables_processing{
    @extend %loading-indicator;

    > div:last-child {
        display: none;
    }
    
    &.error {
        background: rgba(100,0,0,0.1);
    }  
}
.dataTables_scroll{
    overflow-x: auto;
    .dataTables_scrollHead{
        .table{
            margin-top: 0;
            margin-bottom: 0;
        }
    }
    .dataTables_scrollBody{
        th{
            border-top: none !important;
            *{display: none;}
            &:after{
                display: none !important;
            }
        }
    }
}
@media only screen and (max-width: 1450px){
    .table-ordered{
        thead{
            tr th{
                &.sorting.sorting_desc:after{
                    border-top: 8px solid $blue;
                } 
                &.sorting.sorting_asc:after{
                    border-bottom-width: 8px;
					border-top: none;
                }
                &:after{
                    border-top: 8px solid $gray_form;
                }
            }
        }
    }
    .table{
        font-size: 14px;
        line-height: 16px;
        thead tr th{
            font-size: 10px;
            line-height: 12px;
            &.sorting{
                &:after{
                    border-top: 8px solid $gray_form;
                }
                &.sorting-down{
                    &:after{
                        border-bottom: 8px solid $blue;
                    }
                }
            }
        }
    }
}
@media (max-width: $screen-md-min){
    .dataTables_wrapper .dataTables_filter{
        right: 0;
        label.active input{
            width: 200px;
        }
    } 
    .table-ordered thead th.padding-left-slide:first-child{
        padding-left: 265px;
    }
    .table-wrapper{
        .dataTables_paginate{
            margin-bottom: 0;
        }
    }
    .table{
        tr{
            td, th{
                &.for-md-screen{
                    display: none;
                }
            }
        }
    }    
}
@media (max-width: $screen-sm-min){
    .table-mobile-devices{
            width:100%;
            .version{
                max-width: 100%;
            }
            tr .type-title{
                max-width: 100%;
            }
        thead {display: none;}
        tr:nth-of-type(2n) {background-color: inherit;}
        tr {
            border-bottom: 2px solid #ddd !important;
        }
        .total-row{
            .title-row{
                text-align: right;
            }
            td[data-th*="version"], th[data-th*="version"]{
                display: none;
            }
        }
        tbody tr td, tfoot tr th {
            overflow: hidden;
            height: auto;
            font-size: 12px;
            line-height: 14px;
            display: block;  
            position: relative;
            text-align:left;
            border-bottom: 1px solid #ddd !important;
            white-space: normal !important;
            a{
                float: left;
                width: 50%;
                text-align: right;
            }
            &:before { 
                content: attr(data-th); 
                display: block;
                height: 100%;
                text-align:left;
                padding-right: 10px;
                text-transform: uppercase;
                font-family: $trebuchet_bold;
                letter-spacing: 0.5px;
                float: left;
                clear: both;
                width: 50%;
            }
            &.type-title{
                text-overflow: initial;
                &:before{
                    float: left;
                    background-image: none !important;
                    content: attr(data-th); 
                    position: relative;
                    height: 100%;
                    width: 50%;
                }
            }
        }
        tfoot tr th {
            text-align: center;
            &:nth-of-type(2):before,  &:first-of-type:before{
                display: none;
            }
        }
    }
    .table{
        tr{
            td, th{
                &.for-tablets{
                    display: none;
                }
            }
        }
    }
    .dataTables_wrapper .dataTables_filter {
        text-align: right;
        position: relative;
        top: -5px;
        label{
            &:after{
                top: 10px;
            }

            &.active {
                width: 100%;
                input{
                    width: 50%;
                }
            }
        }
    }
    .table-ordered{
        thead{
            th.padding-left-slide:first-child{
                padding-left: 10px;
            }
             tr th.column-questionnaire-title{
                padding-left: 10px;
            }
        }
    }
    .topic-with-button .search-pusher{
        display: none;
    }
}
@media (max-width: $screen-xs-min){
    .dataTables_wrapper {
        .dataTables_info{
            float: none;
            margin-bottom: 10px;
            text-align: left;
        }
        .download-report{
            float: none;
            padding-top: 0;
            text-align: left;
        }
        .dataTables_paginate{
            float: none;
        }
    }
   .dataTables_wrapper .dataTables_filter {
        label{
            &.active {
                width: 100%;
                input{
                    width: 80%;
                }
            }
        }
    }
    .table{
        tr{
            td, th{
                &.for-mobile-devices{
                    display: none;
                }
            }
        }
        tbody tr td:first-child{
            padding-left: 10px;
        }
        thead tr th{
            font-size: 8px;
            line-height: 10px;
            &.sorting{
                &:after{
                    border-width: 4px;
                    border-top: 6px solid $gray_form;
                }
                &.sorting-down{
                    &:after{
                        border-bottom: 6px solid $blue;
                    }
                }
            }
        }
    }
    .table-ordered{
        thead tr th{
            &:after{
                border-width: 4px;
                border-top: 6px solid $gray_form;
            }
            &.sorting_desc:after{
                border-top: 6px solid $blue;
            } 
            &.sorting_asc:after{
                border-bottom-width: 6px;
            }
        }
    }
    .topic-with-button .search-pusher{
        display: none;
    }
}
.table.history{
    td{
        .comment{
            padding-top: 10px;
            h4{
                margin-bottom: 5px;
            }
            p:last-of-type{
                margin: 0;
            }
        }
    }
    td, th{
        padding: 10px;
        &:first-child{
            min-width: 160px;
        }
    }
  }
.uploaded-to-hq{
    min-width: 150px;
}
.table{
	.interviewer, .supervisor{
		padding-left: 0;
	}
}
.table.timestamps-table{
    td{
        vertical-align: top;
        padding: 5px 10px 5px 0;
        height: auto;
        &:first-child{
            width: 70px;
        }
    }
    .app-oppened{
        @include gradient-vertical($gray_form, $gray_form);
        background-size: 250px 1px;
        background-repeat: no-repeat;
        background-position: 0 100%;
        &:last-child{
            background-image: none;
        }
    }
}
.table.hover{
    thead{
        background-color: #2aa9cb;
        color: #164369;
        tr th{
            &.sorting:after {
                border-top-color: #164369;
            }
            &.sorting_asc,
            &.sorting_desc{
                color: #fff;
                &:after {
                    border-bottom-color: #fff;
                }
            }
        }
    }
    .row-highlight td{
        background-color: rgb(198, 222, 243) !important;
    }

}
table.dataTable.fixedHeader-floating,
table.dataTable.fixedHeader-locked {
  background-color: white;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

table.dataTable.fixedHeader-floating {
  position: fixed !important;
}

table.dataTable.fixedHeader-locked {
  position: absolute !important;
}

@media print {
  table.fixedHeader-floating {
    display: none;
  }
}
.has-warnings td{
    box-shadow: inset 0 20px 20px -20px rgba(255,145,0,0.2), inset 0 -20px 20px -20px rgba(255,145,0,0.2);
}


